﻿using System;

namespace fermat
{
    class Program
    {
        static void Main(string[] args)
        {
            int scope = 10000;
            long[] cube = new long[scope];
            for (int i = 1; i <= scope; i++)
                cube[i - 1] = Convert.ToInt64(Math.Pow(i, 3));
            bool flag = false;
            for (long i = 0; i < scope; i++)
            {
                for (long j = i; j < scope; j++)
                {
                    for (long k = ((i + j) / 2); k < scope; k++)
                    {
                        if (cube[i] + cube[j] == cube[k])
                        {
                            flag = true;
                            break;
                        }
                    }
                    if (flag)
                        break;
                }
                if (flag)
                    break;
                Console.WriteLine("费马大定理已验证{0}%", (double)i / 10000);
            }
            if (flag)
                Console.WriteLine("费马大定理不成立");
            else
                Console.WriteLine("费马大定理成立");
        }
    }
}

